package com.dfbz.bigdata.modules.system.doman;




import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName tb_common_dic
 */
@TableName(value ="tb_common_dic")
@Data
public class CommonDic implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long dcId;

    /**
     * 枚举名称
     */
    private String dcName;

    /**
     * 枚举类型
     */
    private Integer dcType;

    /**
     * 枚举上级id
     */
    private Long dcParent;

    /**
     * 枚举key
     */
    private String dcKey;

    /**
     * 
     */
    private String dcPath;

    /**
     * 0正常1删除
     */
    private Integer dcDel;

    /**
     * 排序
     */
    private Integer dcSort;

    /**
     * 创建时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateTime;

    /**
     * 创建人
     */
    private Long createUser;

    /**
     * 修改人
     */
    private Long updateUser;

    /**
     * 是否删除
     */
    @TableLogic(value = "0",delval = "1")
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CommonDic other = (CommonDic) that;
        return (this.getDcId() == null ? other.getDcId() == null : this.getDcId().equals(other.getDcId()))
            && (this.getDcName() == null ? other.getDcName() == null : this.getDcName().equals(other.getDcName()))
            && (this.getDcType() == null ? other.getDcType() == null : this.getDcType().equals(other.getDcType()))
            && (this.getDcParent() == null ? other.getDcParent() == null : this.getDcParent().equals(other.getDcParent()))
            && (this.getDcKey() == null ? other.getDcKey() == null : this.getDcKey().equals(other.getDcKey()))
            && (this.getDcPath() == null ? other.getDcPath() == null : this.getDcPath().equals(other.getDcPath()))
            && (this.getDcDel() == null ? other.getDcDel() == null : this.getDcDel().equals(other.getDcDel()))
            && (this.getDcSort() == null ? other.getDcSort() == null : this.getDcSort().equals(other.getDcSort()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
            && (this.getUpdateUser() == null ? other.getUpdateUser() == null : this.getUpdateUser().equals(other.getUpdateUser()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDcId() == null) ? 0 : getDcId().hashCode());
        result = prime * result + ((getDcName() == null) ? 0 : getDcName().hashCode());
        result = prime * result + ((getDcType() == null) ? 0 : getDcType().hashCode());
        result = prime * result + ((getDcParent() == null) ? 0 : getDcParent().hashCode());
        result = prime * result + ((getDcKey() == null) ? 0 : getDcKey().hashCode());
        result = prime * result + ((getDcPath() == null) ? 0 : getDcPath().hashCode());
        result = prime * result + ((getDcDel() == null) ? 0 : getDcDel().hashCode());
        result = prime * result + ((getDcSort() == null) ? 0 : getDcSort().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
        result = prime * result + ((getUpdateUser() == null) ? 0 : getUpdateUser().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", dcId=").append(dcId);
        sb.append(", dcName=").append(dcName);
        sb.append(", dcType=").append(dcType);
        sb.append(", dcParent=").append(dcParent);
        sb.append(", dcKey=").append(dcKey);
        sb.append(", dcPath=").append(dcPath);
        sb.append(", dcDel=").append(dcDel);
        sb.append(", dcSort=").append(dcSort);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", createUser=").append(createUser);
        sb.append(", updateUser=").append(updateUser);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}